package cn.dazhou.andserverdemo

import android.util.Log
import com.yanzhenjie.andserver.annotation.RestController
import com.yanzhenjie.andserver.annotation.RequestMapping
import com.yanzhenjie.andserver.annotation.GetMapping
import com.yanzhenjie.andserver.annotation.QueryParam

@RestController
@RequestMapping(path = ["/user"])
class UserController {

    @GetMapping("/login")
    fun login(@QueryParam("account") account: String?, @QueryParam("password") password: String?): String {
        Log.i("ABCD", "收到登录请求，account = $account，password = $password")
        return "Successful!"
    }

}